jQuery.prototype.serializeObject=function(){  
    var obj=new Object();  
    $.each(this.serializeArray(),function(index,param){  
        if(!(param.name in obj)){  
            obj[param.name]=param.value;  
        }  
    });  
    return obj;  
}; 


function ajaxReqParm(method , url , reqStr , sync){
	var result = "";
	$.ajax({
	   type: method,
	   async: sync,
	   url: url,
	   data: reqStr,
	   success: function(msg){
		   result =msg;
	   }
	});
	return result;
}

function ajaxReq(method , url , sync){
	var result = "";
	$.ajax({
	   type: method,
	   async: sync,
	   url: url,
	   success: function(msg){
		   result =msg;
	   }
	});
	return result;
}

function doPost(url , reqStr ){
	var result = "";
	if(reqStr==null || reqStr==""){
		result = ajaxReq("POST", url , false);
		
	}else{
		result = ajaxReqParm("POST", url, reqStr , false);
	}
	return result;
}